package com.daoeping.service.impl;

import java.util.List;

import com.daoeping.dao.Cop_companyinfoDAO;
import com.daoeping.data.Cop_companyinfo;
import com.daoeping.service.Cop_companyinfoService;

public class Cop_companyinfoServiceImpl implements Cop_companyinfoService {
	
	private Cop_companyinfoDAO cop_companyinfoDAO;
	
	public Cop_companyinfoDAO getCop_companyinfoDAO() {
		return cop_companyinfoDAO;
	}

	public void setCop_companyinfoDAO(Cop_companyinfoDAO cop_companyinfoDAO) {
		this.cop_companyinfoDAO = cop_companyinfoDAO;
	}

	@Override
	public List<Cop_companyinfo> findCop_companyinfoList() {
		// TODO Auto-generated method stub
		return this.cop_companyinfoDAO.findCop_companyinfoList();
	}

	@Override
	public boolean addCop_companyinfo(Cop_companyinfo cop_companyinfo) {
		// TODO Auto-generated method stub
		//Default IsValidated = 0;
		cop_companyinfo.setIsValidated(0);
		return this.cop_companyinfoDAO.insertData(cop_companyinfo);
	}

	@Override
	public boolean editCop_companyinfo(Cop_companyinfo cop_companyinfo) {
		// TODO Auto-generated method stub
		return this.cop_companyinfoDAO.updateData(cop_companyinfo);
	}

	@Override
	public boolean delCop_companyinfo(Cop_companyinfo cop_companyinfo) {
		// TODO Auto-generated method stub
		return this.cop_companyinfoDAO.deleteData(cop_companyinfo);
	}

	@Override
	public List<Cop_companyinfo> findCop_companyinfoByID(int id) {
		// TODO Auto-generated method stub
		return this.cop_companyinfoDAO.findCop_companyinfoByID(id);
	}

}
